% Note: 
%   1. QW is the predetermined pre-exit distribution of households.
%      1.1 Both Exiting HH and Surviving HH are consuming and working.
%      1.2 Entrant only matters for asset choice, it can be understood as:
%      they inheritate the asset from the exit households, whose asset
%      allocation choice is forced to be bp=0.
%   2. QWp = TrMat_bp*(1-XI)*QW+XI*QW_Entrant
%   3. The distribution of Exit firms is: XI*QW
function Dist_Hist=SteadyState_Distribution(PP,SS)

%% Preliminaries
QW_fz       =   MarkovChain_InvDist(SS.TrProb.CoefMat,SS.TrProb.FlowVec);

MarginQW    =   struct();
UnitNum     =   [SS.DistApp.fz.UnitNum(1),PP.ExoState.IdioInc.N];
DimList     =   {[1],[2], ...
                 [1,2]};
NameList    =   {'f','z',...
                 'f_z'};

for dd=1:length(DimList)
    vv                  =   NameList{dd};
    MarginQW.(vv)       =   DistApp_Hist_MergeQW2Marginal(UnitNum,DimList{dd},QW_fz,'Matrix');
end

Dist_Hist   =   struct('QW_fz',QW_fz,...
                       'Marginal_fz',MarginQW);